package com.ahui.constant;

import lombok.Getter;

@Getter
public enum ModelTypeEnum {

    JYSQD("0","交易申请单","com.example.docextract.handler.process.TradeHandler","Doc001"),
    DQCKXY("1","定期存款协议","com.example.docextract.handler.process.FixedDepositHandler","Doc002"),
    FGKDZXY("2","非公开定增协议","com.example.docextract.handler.process.NoPublicHandler","Doc003"),
    JkTZS("3","缴款通知书","com.example.docextract.handler.process.PaymentHandler","Doc004");

    private final String type;
    private final String name;
    private final String handler;
    private final String params;


    ModelTypeEnum(String type, String name, String handler, String params) {
        this.type = type;
        this.name = name;
        this.handler = handler;
        this.params = params;
    }

    public static ModelTypeEnum getByType(String type) {
        for (ModelTypeEnum value : ModelTypeEnum.values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }
}